// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
  ssr:true,
  devtools: { enabled: true },
  modules: [
    '@element-plus/nuxt'
  ],
  runtimeConfig: {
    apiKey: "123456", // Default to an empty string, automatically set at runtime using process.env.NUXT_API_KEY
    public: {
      baseURL: "https://sd-eh.com", // Exposed to the frontend as well.
      baseServerURL: "https://sd-eh.com"
    }
  },  
  css: [
    '~/assets/css/base.css'
  ],
  devServer: { //添加本地ip调试地址
    host: 'http://localhost',
    port: 3001,
  },
  nitro: {
    devProxy: {
      '/api': {
        target: 'https://sd-eh.com',
        changeOrigin: true,
        // pathRewrite: {'^/api': ''},
        autoRewrite: true
      }
    }
  },
  vite: {
    css: {
      preprocessorOptions: {
        scss: {
          additionalData: '@use "@/assets/css/_colors.scss" as *;'
        }
      }
    }
  }
})
